def hex2uint32(array):
    return array[0] + (array[1] << 1 * 8) + (array[2] << 2 * 8) \
           + (array[3] << 3 * 8)


def hex2uint16(array):
    return array[0] + (array[1] << 1 * 8)
